package com.hspedu.homework;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/5
 * @time 19:36
 */
public class Homewrok03 {
    public static void main(String[] args) {
        conversion("Willian Jefferson Clinton");
    }
    public static void conversion(String name){
        if (name == null){
            System.out.println("name不能为空");
            return;
        }
        String[] strings = name.split(" ");
        if (strings.length != 3){
            System.out.println("输入的格式不对");
            return;
        }

        System.out.println(String.format("%s,%s .%c", strings[2], strings[0], strings[1].toUpperCase().charAt(0)));

    }
}
